<!DOCTYPE html>
<html lang="en">
   <head>
      <meta charset="UTF-8">
      <title>对象</title>
   </head>
   <body>
      <script>
         let obj = {
            uname: '张三',
            age: 18,
            sex: '男',
            hobby: ['吃饭', '睡觉', '打豆豆'],
            say: function () {
               return `我叫${this.name}，今年${this.age}岁，性别${this.sex}，爱好${this.hobby}`
            }
         }
         for (let key in obj) {
            // console.log(key)
            console.log(obj[key])
         }
      </script>
   </body>
</html>